package com.pokermind.model.dto;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 用户统计响应DTO
 * 实现5.5.1 用户统计概览
 * 
 * @author PokerMind Team
 */
public class UserStatisticsResponse {
    
    @JsonProperty("overall_stats")
    private OverallStats overallStats;
    
    @JsonProperty("position_stats")
    private Map<String, PositionStats> positionStats;
    
    @JsonProperty("monthly_trend")
    private List<MonthlyTrend> monthlyTrend;
    
    @JsonProperty("performance_metrics")
    private PerformanceMetrics performanceMetrics;
    
    // 默认构造函数
    public UserStatisticsResponse() {}
    
    // Getters and Setters
    public OverallStats getOverallStats() {
        return overallStats;
    }
    
    public void setOverallStats(OverallStats overallStats) {
        this.overallStats = overallStats;
    }
    
    public Map<String, PositionStats> getPositionStats() {
        return positionStats;
    }
    
    public void setPositionStats(Map<String, PositionStats> positionStats) {
        this.positionStats = positionStats;
    }
    
    public List<MonthlyTrend> getMonthlyTrend() {
        return monthlyTrend;
    }
    
    public void setMonthlyTrend(List<MonthlyTrend> monthlyTrend) {
        this.monthlyTrend = monthlyTrend;
    }
    
    public PerformanceMetrics getPerformanceMetrics() {
        return performanceMetrics;
    }
    
    public void setPerformanceMetrics(PerformanceMetrics performanceMetrics) {
        this.performanceMetrics = performanceMetrics;
    }
    
    /**
     * 总体统计
     */
    public static class OverallStats {
        @JsonProperty("total_hands")
        private Integer totalHands;
        
        @JsonProperty("total_profit")
        private BigDecimal totalProfit;
        
        @JsonProperty("win_rate")
        private BigDecimal winRate;
        
        @JsonProperty("avg_pot_size")
        private BigDecimal avgPotSize;
        
        @JsonProperty("bb_per_100")
        private BigDecimal bbPer100;
        
        @JsonProperty("hours_played")
        private BigDecimal hoursPlayed;
        
        @JsonProperty("roi")
        private BigDecimal roi;
        
        @JsonProperty("variance")
        private BigDecimal variance;
        
        public OverallStats() {}
        
        // Getters and Setters
        public Integer getTotalHands() {
            return totalHands;
        }
        
        public void setTotalHands(Integer totalHands) {
            this.totalHands = totalHands;
        }
        
        public BigDecimal getTotalProfit() {
            return totalProfit;
        }
        
        public void setTotalProfit(BigDecimal totalProfit) {
            this.totalProfit = totalProfit;
        }
        
        public BigDecimal getWinRate() {
            return winRate;
        }
        
        public void setWinRate(BigDecimal winRate) {
            this.winRate = winRate;
        }
        
        public BigDecimal getAvgPotSize() {
            return avgPotSize;
        }
        
        public void setAvgPotSize(BigDecimal avgPotSize) {
            this.avgPotSize = avgPotSize;
        }
        
        public BigDecimal getBbPer100() {
            return bbPer100;
        }
        
        public void setBbPer100(BigDecimal bbPer100) {
            this.bbPer100 = bbPer100;
        }
        
        public BigDecimal getHoursPlayed() {
            return hoursPlayed;
        }
        
        public void setHoursPlayed(BigDecimal hoursPlayed) {
            this.hoursPlayed = hoursPlayed;
        }
        
        public BigDecimal getRoi() {
            return roi;
        }
        
        public void setRoi(BigDecimal roi) {
            this.roi = roi;
        }
        
        public BigDecimal getVariance() {
            return variance;
        }
        
        public void setVariance(BigDecimal variance) {
            this.variance = variance;
        }
    }
    
    /**
     * 位置统计
     */
    public static class PositionStats {
        private Integer hands;
        private BigDecimal profit;
        private BigDecimal vpip;
        private BigDecimal pfr;
        @JsonProperty("three_bet")
        private BigDecimal threeBet;
        private BigDecimal cbet;
        @JsonProperty("win_rate")
        private BigDecimal winRate;
        
        public PositionStats() {}
        
        public PositionStats(Integer hands, BigDecimal profit, BigDecimal vpip, BigDecimal pfr) {
            this.hands = hands;
            this.profit = profit;
            this.vpip = vpip;
            this.pfr = pfr;
        }
        
        // Getters and Setters
        public Integer getHands() {
            return hands;
        }
        
        public void setHands(Integer hands) {
            this.hands = hands;
        }
        
        public BigDecimal getProfit() {
            return profit;
        }
        
        public void setProfit(BigDecimal profit) {
            this.profit = profit;
        }
        
        public BigDecimal getVpip() {
            return vpip;
        }
        
        public void setVpip(BigDecimal vpip) {
            this.vpip = vpip;
        }
        
        public BigDecimal getPfr() {
            return pfr;
        }
        
        public void setPfr(BigDecimal pfr) {
            this.pfr = pfr;
        }
        
        public BigDecimal getThreeBet() {
            return threeBet;
        }
        
        public void setThreeBet(BigDecimal threeBet) {
            this.threeBet = threeBet;
        }
        
        public BigDecimal getCbet() {
            return cbet;
        }
        
        public void setCbet(BigDecimal cbet) {
            this.cbet = cbet;
        }
        
        public BigDecimal getWinRate() {
            return winRate;
        }
        
        public void setWinRate(BigDecimal winRate) {
            this.winRate = winRate;
        }
    }
    
    /**
     * 月度趋势
     */
    public static class MonthlyTrend {
        private String month;
        private Integer hands;
        private BigDecimal profit;
        @JsonProperty("win_rate")
        private BigDecimal winRate;
        @JsonProperty("bb_per_100")
        private BigDecimal bbPer100;
        private BigDecimal variance;
        
        public MonthlyTrend() {}
        
        public MonthlyTrend(String month, Integer hands, BigDecimal profit, BigDecimal winRate) {
            this.month = month;
            this.hands = hands;
            this.profit = profit;
            this.winRate = winRate;
        }
        
        // Getters and Setters
        public String getMonth() {
            return month;
        }
        
        public void setMonth(String month) {
            this.month = month;
        }
        
        public Integer getHands() {
            return hands;
        }
        
        public void setHands(Integer hands) {
            this.hands = hands;
        }
        
        public BigDecimal getProfit() {
            return profit;
        }
        
        public void setProfit(BigDecimal profit) {
            this.profit = profit;
        }
        
        public BigDecimal getWinRate() {
            return winRate;
        }
        
        public void setWinRate(BigDecimal winRate) {
            this.winRate = winRate;
        }
        
        public BigDecimal getBbPer100() {
            return bbPer100;
        }
        
        public void setBbPer100(BigDecimal bbPer100) {
            this.bbPer100 = bbPer100;
        }
        
        public BigDecimal getVariance() {
            return variance;
        }
        
        public void setVariance(BigDecimal variance) {
            this.variance = variance;
        }
    }
    
    /**
     * 性能指标
     */
    public static class PerformanceMetrics {
        @JsonProperty("showdown_win_rate")
        private BigDecimal showdownWinRate;
        
        @JsonProperty("non_showdown_win_rate")
        private BigDecimal nonShowdownWinRate;
        
        @JsonProperty("preflop_aggression")
        private BigDecimal preflopAggression;
        
        @JsonProperty("postflop_aggression")
        private BigDecimal postflopAggression;
        
        @JsonProperty("fold_to_cbet")
        private BigDecimal foldToCbet;
        
        @JsonProperty("steal_success")
        private BigDecimal stealSuccess;
        
        public PerformanceMetrics() {}
        
        // Getters and Setters
        public BigDecimal getShowdownWinRate() {
            return showdownWinRate;
        }
        
        public void setShowdownWinRate(BigDecimal showdownWinRate) {
            this.showdownWinRate = showdownWinRate;
        }
        
        public BigDecimal getNonShowdownWinRate() {
            return nonShowdownWinRate;
        }
        
        public void setNonShowdownWinRate(BigDecimal nonShowdownWinRate) {
            this.nonShowdownWinRate = nonShowdownWinRate;
        }
        
        public BigDecimal getPreflopAggression() {
            return preflopAggression;
        }
        
        public void setPreflopAggression(BigDecimal preflopAggression) {
            this.preflopAggression = preflopAggression;
        }
        
        public BigDecimal getPostflopAggression() {
            return postflopAggression;
        }
        
        public void setPostflopAggression(BigDecimal postflopAggression) {
            this.postflopAggression = postflopAggression;
        }
        
        public BigDecimal getFoldToCbet() {
            return foldToCbet;
        }
        
        public void setFoldToCbet(BigDecimal foldToCbet) {
            this.foldToCbet = foldToCbet;
        }
        
        public BigDecimal getStealSuccess() {
            return stealSuccess;
        }
        
        public void setStealSuccess(BigDecimal stealSuccess) {
            this.stealSuccess = stealSuccess;
        }
    }
}